#include "drv_seg.h"
#include "drv_spi.h"
#include "drv_systick.h"
static uint8_t num[]=
{
	0x3F,  //"0"
    0x06,  //"1"
    0x5B,  //"2"
    0x4F,  //"3"
    0x66,  //"4"
    0x6D,  //"5"
    0x7D,  //"6"
    0x07,  //"7"
    0x7F,  //"8"
    0x6F,  //"9"
};
void drv_seg_init(void)
{
	drv_spi_init();
}
void drv_seg(uint8_t num_sng,uint8_t data)
{
	drv_spi2_senddata(num_sng);
	drv_spi2_senddata(num[data]);
	GPIO_ResetBits( GPIOB, GPIO_Pin_12);
	drv_systick_ms(1);
	GPIO_SetBits( GPIOB, GPIO_Pin_12);
}
